package com.tyl.arrray;

import java.util.Scanner;

public class tyl0908 {

    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        System.out.println("输入一个六位数");
        int number= scanner.nextInt();
        System.out.println("加密前的数据"+number);
        int[] arr=new int[6];
        arr[0]=number/10000;
        arr[1]=number/10000%10;
        arr[2]=number/1000%10;
        arr[3]=number/100%10;
        arr[4]=number/10%10;
        arr[5]=number%10;
        for (int i = 0; i < 6; i++) {
            arr[i]=(arr[i]+5)%10;
        }
        int temp=0;
        for (int i = 0; i < arr.length /2; i++) {
            temp=arr[i];
            arr[i]=arr[arr.length-1-i];
            arr[arr.length-1-i]=temp;

        }
        System.out.println("加密后的数据：");
        for (int i = 0; i < arr.length-1; i++) {
            System.out.println(arr[i]);
        }


    }
}
